package com.kitten.count.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author kitten
 */
@Getter
@AllArgsConstructor
public enum CollectUnCollectTypeEnum {

    COLLECT(1),    // 收藏
    UNCOLLECT(0),      // 取消收藏
    ;

    private final Integer code;

    public static CollectUnCollectTypeEnum valueOf(Integer code) {
        for (CollectUnCollectTypeEnum collectUnCollectTypeEnum : CollectUnCollectTypeEnum.values()) {
            if (collectUnCollectTypeEnum.getCode().equals(code)) {
                return collectUnCollectTypeEnum;
            }
        }
        return null;
    }
}
